package com.itheima.demo07.Function;

import java.util.function.Function;

public class Demo02Function_andThen {
    public static void main(String[] args) {
        String str = "123";
        change(str, s -> Integer.parseInt(str) + 10, s -> String.valueOf(s));
    }

    public static void change(String str, Function<String, Integer> fun1, Function<Integer, String> fun2) {
        String s = fun1.andThen(fun2).apply(str);
        System.out.println(s);
    }
}
